﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PrintDll
{
    /// <summary>
    /// PrintPreviewWindow.xaml 的交互逻辑
    /// </summary>
    public partial class PrintPreviewWindow : Window
    {
        PrintModel pm = null;
        public PrintPreviewWindow(PrintModel pm)
        {
            InitializeComponent();
            this.pm = pm;
            
        }

        private void PrintPreviewWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            //var userControl = new PrintWeightControl(pm,new BitmapImage());
            //border.Child = userControl;
            ////PrintHelper.Print(userControl, "123");
            //OPrintHelper.Print(userControl, "123");
            //this.Close();
            var userControl = new ChiFengTag("豫A11111", "赤峰云铜有色金属有限公司", "赤峰云铜有色金属有限公司", "11吨", "10吨", "1吨", "1#23412315123", "硫酸92.5%", "孙悟空");
            //border.Child = userControl;
            OPrintHelper.Print(userControl, "123");
            //var userControl = new ChiFengTag("豫A11111", "赤峰云铜有色金属有限公司", "赤峰云铜有色金属有限公司", "11吨", "10吨", "1吨", "1#23412315123", "硫酸92.5%", "孙悟空");
            //border.Child = userControl;
            //OPrintHelper.Print(userControl, "123");

        }
    }
}
